﻿namespace _24_Hour_Blogger.ViewModels
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using _24_Hour_Blogger.ViewModels;
    using _24_Hour_Blogger.Library;
    using _24_Hour_Blogger.Models;
    using _24_Hour_Blogger.ViewModels.Content;
    using _24_Hour_Blogger.Models.Content;

    public class ManagerViewModel : ViewModelBase<Blogger>
    {
        public ManagerViewModel()
            : base()
        {

        }

        public BlogViewModel BlogTemplate
        {
            get
            {
                var template = new BlogViewModel();
                
                // placeholders until there are tools for managing categories, etc
                template.StatusId = 1;
                template.PrimaryCategoryId = 1;
                template.UserId = 1;
                template.CreatedByUserId = 1;
                template.UpdatedByUserId = 1;

                return template;
            }
        }

        private List<GetBlogs_Result> blogs;
            public List<GetBlogs_Result> Blogs
        {
            get
            {
                if (blogs == null)
                {
                    blogs = this.DataStore.ContentEntities.GetBlogs(0,0,null).ToList();
                }
                return blogs;
            }
        }
    }
}